/*****************************************************************************
 * Open MCT, Copyright (c) 2014-2016, United States Government
 * as represented by the Administrator of the National Aeronautics and Space
 * Administration. All rights reserved.
 *
 * Open MCT is licensed under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 *
 * Open MCT includes source code licensed under additional open source
 * licenses. See the Open Source Licenses file (LICENSES.md) included with
 * this source code distribution or the Licensing information page available
 * at runtime from the About dialog for additional information.
 *****************************************************************************/

.overlay {
    font-size: 90%;
    &.delayEntry100ms {
        @include keyframes(fadeInFromNone) {
            0% { display: none; opacity: 0; }
            100% { display: block; opacity: 1; }
        }
        @include animation-delay($delayEntryMs);
        @include animation(fadeInFromNone $durEntryMs ease-in);
    }
    .blocker {
        background: $colorOvrBlocker;
        z-index: 100;
    }
    .close {
        font-size: 0.8rem;
        position: absolute;
        top: $interiorMarginLg;
        right: $interiorMarginLg;
        bottom: auto;
        left: auto;
        z-index: 100;
    }
    > .holder {
        @include containerSubtle($colorOvrBg, $colorOvrFg);
        border-radius: $basicCr * 3;
        color: $colorOvrFg;
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        @include transform(translateX(-50%) translateY(-50%));
        height: 70%;
        width: 50%;
        min-height: 300px;
        min-width: 600px;
        z-index: 101;
        > .contents {
            $m: $overlayMargin;
            top: $m;
            right: $m;
            bottom: $m;
            left: $m;
        }
    }
    .title {
        @include ellipsize();
        font-size: 1.2em;
        line-height: 120%;
        margin-bottom: $interiorMargin;
    }

    .hint, .field-hints { color: $colorFieldHintOverlay !important;  }

    .abs.top-bar {
        height: $ovrTopBarH;
    }

    .abs.editor,
    .abs.message-body {
        top: $ovrTopBarH + $interiorMarginLg;
        bottom: $ovrFooterH + $interiorMarginLg;
        left: 0;
        right: 0;
        overflow: auto;
        .field.l-input-med {
            input[type='text'] {
                width: 100%;
            }
        }
    }

    .bottom-bar {
        text-align: right;
        .s-button {
            $bg: $colorOvrBtnBg;
            &:not(.major) {
                @include btnSubtle($bg, pullForward($bg, 10%), $colorOvrBtnFg, $colorOvrBtnFg);
            }
            font-size: 95%;
            height: $ovrFooterH;
            line-height: $ovrFooterH;
            margin-left: $interiorMargin;
            padding: 0 $interiorMargin * 3;
            &:first-child {
                margin-left: 0;
            }
        }

    }

    .abs.bottom-bar {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        overflow: visible;
        height: $ovrFooterH;
    }

    .l-progress-bar {
        $h: $progressBarHOverlay;
        display: block;
        height: $h;
        line-height: $h;
        margin: .5em 0;
        width: 100%;
    }

    .select {
        box-shadow: $shdwBtnsOverlay;
    }
}

.t-dialog-sm .overlay > .holder {
    // Used for blocker and in-progress dialogs, modal alerts, etc.
    $h: 225px;
    min-height: $h;
    height: $h;
}
